package com.example.wechatbusiness.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author: ASUS
 * @date: 2020/12/11 10:02
 * @description:
 */
@Configuration
public class SpringMvcConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("login_v2");
        registry.addViewController("/index.html").setViewName("index");
        registry.addViewController("/teams_board.html").setViewName("teams_board");
        registry.addViewController("/graph_echarts.html").setViewName("graph_echarts");

    }
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new LoginHandlerInterceptor()).addPathPatterns("/**").excludePathPatterns("/login.html","/","/tologin","/webjars/**",
//                "/css/**","fonts/**","/images/**","/js/**","/lib/**","/userlogin","/tologin.html","/law-list.html","/mulu-list.html","/member-list.html",
//                "admin-add.html","/client/**","/user-index.html");
//    }
}
